/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Endstart
 * Date: 2021-06-26
 * Time: 11:15
 */
public class GiftCard {
    private double amount;

    public GiftCard(double amount) {
        this.amount = amount;
    }

    public void buyBook(double amount) {
        if (this.amount >= amount) {
            this.amount -= amount;
            System.out.println("Books bought successfully");
        } else {
            System.out.println("No enough money in the card");
        }
    }

    public double amountRemaining() {
        return amount;
    }
}
